package com.chinasoft.mapper;

import com.chinasoft.domain.Product;
import com.chinasoft.query.ProductQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface ProductMapper {
   Product findOne(Long id);
   Product findByQuery(ProductQuery query);
   //批量添加
   void  batchInsert(List<Product>  list );

   //批量删除
   void batchDelete(List<Long> ids);

   List<Product> findProduct(Product product);

   void update(Product product);

    List<Product> findByIdAndName(@Param("id") Long id, @Param("name") String name);
    List<Product> findByIds(Set<Long> ids);
    List<Product> findByIds2(Long[] ids);
  List<Product>  findByIdOrName(@Param("id") Long id,@Param("name") String name);
   void save(Product product);
}
